﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace RulesEngine
{
    /// <summary>
    /// Implementation of the rules doing calculations at the end of the turn
    /// </summary>
    class RulesEngine
    {
        /// <summary>
        /// Calculate new values for the manager's companies
        /// </summary>
        /// <param name="manager">Manager at the end of the turn</param>
        /// <returns>Manager at the start of a new turn</returns>
        public Manager CalculateValues (Manager manager)
        {
            //Just an example

            foreach (Company company in manager.Companies)
            {
                if (company.Operations != null && company.HaveSauna())
                {
                    company.Happiness++;    
                }                
            }

            return manager;
        }
    }
}
